package edu.ccut.saturn.studio.naviagtor.actions;

import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;

import edu.ccut.saturn.studio.Activator;
import edu.ccut.saturn.studio.Images;
import edu.ccut.saturn.studio.core.util.action.SaturnAction;
import edu.ccut.saturn.studio.core.util.eclipse.Messages;
import edu.ccut.saturn.studio.logic.ActionWizard;

public class NewSaturnActionAction extends SaturnAction {
	public NewSaturnActionAction() {
//		setText("Action"); //$NON-NLS-1$
		setText(Messages.getString("NewSaturnActionAction.actionCompont"));   //$NON-NLS-1$
		setImageDescriptor(Activator.getImageDescriptor(Images.NEWSATURN_ACTION_ACTION));
	}

	public void run() {
		ActionWizard newActionWizard = new ActionWizard();
		
		newActionWizard.init(PlatformUI.getWorkbench(), super
				.getStructuredSelection());

		new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow()
				.getShell(), newActionWizard).open();
	}
}
